package com.pan.structual.bridge.graphics.impl;

import com.pan.structual.bridge.graphics.Shape;

import java.awt.*;
import java.awt.image.BufferedImage;

public class Square extends Shape {
    private Graphics graphics;
    private BufferedImage bufferedImage;{
    }

    @Override
    public BufferedImage drawShape() {
        bufferedImage = new BufferedImage(200,200,BufferedImage.TYPE_INT_RGB);
        graphics = bufferedImage.createGraphics();
        graphics.setColor(super.myColor.getColor());
        graphics.fillRect(50,50,100,100);
        return bufferedImage;
    }
}
